package com.jt.www.enums.woxuebao;

import org.springframework.util.StringUtils;

/**
 * @author admin_ltf
 * @create 2019-06-01 16:59
 */

public enum ProgramToLevelEnum {

    Prod1("19FA595040", "1"),
    Prod2("19FA210077", "2"),
    Prod3("19FA143892", "3");

    private String proGram;
    private String proLevel;


    ProgramToLevelEnum(String proGram, String proLevel) {
        this.proGram = proGram;
        this.proLevel = proLevel;
    }

    public static String getprodLevel(String proGram) {
        String proLevel = null;
        if (StringUtils.isEmpty(proGram)) {
            return proLevel;
        }
        for (ProgramToLevelEnum oldProdNameToNewEnum : ProgramToLevelEnum.values()) {
            if (proGram.equals(oldProdNameToNewEnum.proGram)) {
                proLevel = oldProdNameToNewEnum.proLevel;
                break;
            }
        }
        return proLevel;
    }

    public String getProGram() {
        return proGram;
    }

    public String getProLevel() {
        return proLevel;
    }
}
